<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>科研信息交流平台 - 管理登录</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --dark-bg: #0d1117;
            --dark-card: #161b22;
            --dark-border: #30363d;
            --dark-text: #c9d1d9;
            --dark-text-secondary: #8b949e;
            --accent-blue: #58a6ff;
            --accent-green: #3fb950;
            --accent-purple: #bc8cff;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
        }
        
        body {
            background-color: var(--dark-bg);
            color: var(--dark-text);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
            line-height: 1.5;
        }
        
        .container {
            display: flex;
            flex-direction: column;
            width: 100%;
            max-width: 340px;
        }
        
        .header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .logo {
            font-size: 32px;
            color: var(--accent-blue);
            margin-bottom: 16px;
        }
        
        .title {
            font-size: 24px;
            font-weight: 300;
            letter-spacing: -0.5px;
            margin-bottom: 8px;
            color: var(--dark-text);
        }
        
        .subtitle {
            font-size: 14px;
            color: var(--dark-text-secondary);
        }
        
        .login-box {
            background-color: var(--dark-card);
            border: 1px solid var(--dark-border);
            border-radius: 6px;
            padding: 20px;
            font-size: 14px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        }
        
        .form-group {
            margin-bottom: 16px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            color: var(--dark-text);
        }
        
        .form-control {
            margin-top: 5px;
            padding: 8px 12px;
            border: 1px solid var(--dark-border);
            border-radius: 6px;
            width: 100%;
            font-size: 14px;
            line-height: 20px;
            color: var(--dark-text);
            background-color: var(--dark-bg);
            transition: all 0.2s ease-in-out;
        }
        
        .form-control:focus {
            border-color: var(--accent-blue);
            outline: none;
            box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
        }
        
        .input-with-icon {
            position: relative;
        }
        
        .input-with-icon i {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--dark-text-secondary);
            z-index: 1;
        }
        
        .input-with-icon input {
            padding-left: 35px;
            background-color: var(--dark-bg);
        }
        
        .password-toggle {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--dark-text-secondary);
            cursor: pointer;
            z-index: 1;
        }
        
        .password-toggle:hover {
            color: var(--accent-blue);
        }
        
        .captcha-container {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        .captcha-input {
            flex: 1;
        }
        
        .captcha-img {
            width: 100px;
            height: 34px;
            background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            cursor: pointer;
            user-select: none;
        }
        
        .btn {
            display: block;
            width: 100%;
            text-align: center;
            background-color: var(--accent-green);
            color: white;
            border: 1px solid rgba(27, 31, 35, 0.15);
            padding: 8px 16px;
            font-size: 14px;
            font-weight: 500;
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.2s ease-in-out;
        }
        
        .btn:hover {
            background-color: #2ea043;
        }
        
        .btn-login {
            margin-top: 20px;
            background-color: var(--accent-blue);
        }
        
        .btn-login:hover {
            background-color: #388bfd;
        }
        
        .options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 16px;
            font-size: 13px;
        }
        
        .remember-me {
            display: flex;
            align-items: center;
            gap: 5px;
            color: var(--dark-text-secondary);
        }
        
        .forgot-password {
            color: var(--accent-blue);
            text-decoration: none;
        }
        
        .forgot-password:hover {
            text-decoration: underline;
        }
        
        .divider {
            height: 1px;
            background-color: var(--dark-border);
            margin: 20px 0;
            text-align: center;
            position: relative;
        }
        
        .divider-text {
            background-color: var(--dark-card);
            padding: 0 15px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: var(--dark-text-secondary);
            font-size: 12px;
        }
        
        .social-login {
            display: flex;
            justify-content: center;
            gap: 12px;
        }
        
        .social-btn {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--dark-bg);
            border: 1px solid var(--dark-border);
            cursor: pointer;
            transition: all 0.2s ease-in-out;
        }
        
        .social-btn:hover {
            border-color: var(--accent-blue);
            box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
        }
        
        .social-btn i {
            color: var(--dark-text);
        }
        
        .footer {
            margin-top: 40px;
            padding: 16px;
            text-align: center;
            font-size: 12px;
            color: var(--dark-text-secondary);
            border-top: 1px solid var(--dark-border);
        }
        
        .footer-links {
            display: flex;
            justify-content: center;
            gap: 16px;
            margin-top: 8px;
        }
        
        .footer-link {
            color: var(--accent-blue);
            text-decoration: none;
        }
        
        .footer-link:hover {
            text-decoration: underline;
        }
        
        .theme-switch {
            position: absolute;
            top: 20px;
            right: 20px;
            cursor: pointer;
            color: var(--dark-text-secondary);
            font-size: 20px;
            transition: color 0.3s;
        }
        
        .theme-switch:hover {
            color: var(--accent-blue);
        }
        
        @media (max-width: 480px) {
            .container {
                max-width: 100%;
            }
            
            .login-box {
                padding: 15px;
            }
            
            .theme-switch {
                top: 10px;
                right: 10px;
            }
        }
    </style>
</head>
<body>
    
    <div class="container">
        <div class="header">
            <div class="logo">
                <i class="fas fa-flask"></i>
            </div>
            <h1 class="title">科研信息交流平台</h1>
            <p class="subtitle">管理平台登录</p>
        </div>
        
        <div class="login-box">
            <form id="loginForm">
                <div class="form-group">
                    <label for="username">用户名</label>
                    <div class="input-with-icon">
                        <i class="fas fa-user"></i>
                        <input type="text" id="username" class="form-control" placeholder="请输入用户名" value="admin" autocomplete="username">
                    </div>
                </div>
                
                <div class="form-group">
                    <label for="password">密码</label>
                    <div class="input-with-icon">
                        <i class="fas fa-lock"></i>
                        <input type="password" id="password" class="form-control" placeholder="请输入密码" value="123456" autocomplete="current-password">
                        <span class="password-toggle" id="togglePassword">
                            <i class="fas fa-eye-slash"></i>
                        </span>
                    </div>
                </div>
                
                <div class="form-group">
                    <label for="captcha">验证码</label>
                    <div class="captcha-container">
                        <div class="input-with-icon captcha-input">
                            <i class="fas fa-shield-alt"></i>
                            <input type="text" id="captcha" class="form-control" placeholder="请输入验证码" value="xszg" autocomplete="off">
                        </div>
                        <div class="captcha-img" id="captchaImg">
                            XSZG
                        </div>
                    </div>
                </div>
                
                <button type="submit" class="btn btn-login">登录</button>
                
                <div class="options">
                    <label class="remember-me">
                        <input type="checkbox" id="remember"> 记住我
                    </label>
                    <a href="#" class="forgot-password">忘记密码?</a>
                </div>
            </form>
            
            <div class="divider">
                <span class="divider-text">或使用以下方式登录</span>
            </div>
            
            <div class="social-login">
                <div class="social-btn">
                    <i class="fab fa-github"></i>
                </div>
                <div class="social-btn">
                    <i class="fas fa-envelope"></i>
                </div>
                <div class="social-btn">
                    <i class="fas fa-mobile-alt"></i>
                </div>
            </div>
        </div>
        
        <div class="footer">
            <p>© 2025 科研信息交流平台 - 管理后台</p>
            <div class="footer-links">
                <a href="#" class="footer-link">条款</a>
                <a href="#" class="footer-link">隐私</a>
                <a href="#" class="footer-link">安全</a>
                <a href="#" class="footer-link">联系</a>
            </div>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const loginForm = document.getElementById('loginForm');
            const togglePassword = document.getElementById('togglePassword');
            const passwordInput = document.getElementById('password');
            const captchaImg = document.getElementById('captchaImg');
            const themeSwitch = document.getElementById('themeSwitch');
            
            // 密码显示/隐藏功能
            togglePassword.addEventListener('click', function() {
                if (passwordInput.type == 'password') {
                    passwordInput.type = 'text';
                    togglePassword.innerHTML = '<i class="fas fa-eye"></i>';
                } else {
                    passwordInput.type = 'password';
                    togglePassword.innerHTML = '<i class="fas fa-eye-slash"></i>';
                }
            });
            
            // 验证码刷新功能
            captchaImg.addEventListener('click', function() {
                // 生成随机验证码
                const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
                let captcha = '';
                for (let i = 0; i < 4; i++) {
                    captcha += chars.charAt(Math.floor(Math.random() * chars.length));
                }
                captchaImg.textContent = captcha;
            });
            
            // 表单提交
            loginForm.addEventListener('submit', function(e) {
                e.preventDefault();
                
                const username = document.getElementById('username').value;
                const password = document.getElementById('password').value;
                const captcha = document.getElementById('captcha').value;
                
                if (!username) {
                    showError('用户名不能为空');
                    return;
                }
                
                if (!password) {
                    showError('密码不能为空');
                    return;
                }
                
                if (!captcha) {
                    showError('验证码不能为空');
                    return;
                }
                
                // 模拟登录过程
                const btn = this.querySelector('.btn-login');
                const originalText = btn.textContent;
                btn.textContent = '登录中...';
                btn.disabled = true;
                
                setTimeout(function() {
                // 这里会跳转到核心工作台
                 window.location.href = 'index.html';
                }, 1000);
            });
            
            // 初始生成验证码
            captchaImg.click();
            
            // 显示错误消息
            function showError(message) {
                // 这里可以使用更美观的通知组件
                alert(message);
            }
            
            // 显示成功消息
            function showSuccess(message) {
                // 这里可以使用更美观的通知组件
                alert(message);
            }
        });
    </script>
</body>
</html>